package com.liqi.items.service.impl;

import java.util.List;
import com.liqi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.liqi.items.mapper.TRelServiceBranchMapper;
import com.liqi.items.domain.TRelServiceBranch;
import com.liqi.items.service.ITRelServiceBranchService;

/**
 * 网点事项关联Service业务层处理
 * 
 * @author xiaoli
 * @date 2022-05-17
 */
@Service
public class TRelServiceBranchServiceImpl implements ITRelServiceBranchService 
{
    @Autowired
    private TRelServiceBranchMapper tRelServiceBranchMapper;

    /**
     * 查询网点事项关联
     * 
     * @param id 网点事项关联主键
     * @return 网点事项关联
     */
    @Override
    public TRelServiceBranch selectTRelServiceBranchById(Long id)
    {
        return tRelServiceBranchMapper.selectTRelServiceBranchById(id);
    }

    @Override
    public TRelServiceBranch selectTRelServiceBranchByServiceCode(TRelServiceBranch tRelServiceBranch) {
        return tRelServiceBranchMapper.selectTRelServiceBranchByServiceCode(tRelServiceBranch);
    }

    /**
     * 查询网点事项关联列表
     * 
     * @param tRelServiceBranch 网点事项关联
     * @return 网点事项关联
     */
    @Override
    public List<TRelServiceBranch> selectTRelServiceBranchList(TRelServiceBranch tRelServiceBranch)
    {
        return tRelServiceBranchMapper.selectTRelServiceBranchList(tRelServiceBranch);
    }

    /**
     * 新增网点事项关联
     * 
     * @param tRelServiceBranch 网点事项关联
     * @return 结果
     */
    @Override
    public int insertTRelServiceBranch(TRelServiceBranch tRelServiceBranch)
    {
        tRelServiceBranch.setCreateTime(DateUtils.getNowDate());
        return tRelServiceBranchMapper.insertTRelServiceBranch(tRelServiceBranch);
    }

    /**
     * 修改网点事项关联
     * 
     * @param tRelServiceBranch 网点事项关联
     * @return 结果
     */
    @Override
    public int updateTRelServiceBranch(TRelServiceBranch tRelServiceBranch)
    {
        tRelServiceBranch.setUpdateTime(DateUtils.getNowDate());
        return tRelServiceBranchMapper.updateTRelServiceBranch(tRelServiceBranch);
    }

    /**
     * 批量删除网点事项关联
     * 
     * @param ids 需要删除的网点事项关联主键
     * @return 结果
     */
    @Override
    public int deleteTRelServiceBranchByIds(Long[] ids)
    {
        return tRelServiceBranchMapper.deleteTRelServiceBranchByIds(ids);
    }

    /**
     * 删除网点事项关联信息
     * 
     * @param id 网点事项关联主键
     * @return 结果
     */
    @Override
    public int deleteTRelServiceBranchById(Long id)
    {
        return tRelServiceBranchMapper.deleteTRelServiceBranchById(id);
    }
}
